<template>
  <div>
    <!-- 使用flex布局的搜索容器 -->
    <div class="search-container">
      <span class="search-label">企业：</span>
      <el-input v-model="input" placeholder="请输入内容" class="search-input"></el-input>
      
      <span class="search-label">账号：</span>
      <el-input v-model="input" placeholder="请输入内容" class="search-input"></el-input>
      
      <el-button type="primary" class="search-button">查询</el-button>
      <el-button type="success" class="search-button">重置</el-button>
    </div>

    <el-table :data="tableData" border style="width: 100%; margin-top: 15px;">
      <el-table-column fixed prop="date" label="hr所属企业" width="150"></el-table-column>
      <el-table-column prop="name" label="hr账号" width="120"></el-table-column>
      <el-table-column prop="province" label="hr身份" width="120"></el-table-column>
      <el-table-column fixed="right" label="hr操作" width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">重置密码</el-button>
          <el-button type="text" size="small">封禁hr</el-button>
        </template>
      </el-table-column>
    </el-table>

    <!-- 分页组件 -->
    <el-pagination class="pagination-left" background layout="prev, pager, next" :total="1000"></el-pagination>
  </div>
</template>

<script>
export default {
  methods: {
    handleClick(row) {
      console.log(row);
    }
  },
  data() {
    return {
      input: '',
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1518 弄',
        zip: 200333
      }, {
        date: '2016-05-04',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1517 弄',
        zip: 200333
      }, {
        date: '2016-05-01',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1519 弄',
        zip: 200333
      }, {
        date: '2016-05-03',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1516 弄',
        zip: 200333
      }]
    }
  }
}
</script>

<style>
/* 搜索容器样式 */
.search-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
}

/* 搜索标签样式 */
.search-label {
  white-space: nowrap;
  font-size: 14px;
  color: #606266;
}

/* 输入框样式 */
.search-input {
  width: 200px;
}

/* 按钮样式 */
.search-button {
  margin-left: 10px;
}

/* 分页样式 */
.pagination-left {
  margin-top: 15px;
  text-align: left;
}

/* 表格顶部间距 */
.el-table {
  margin-top: 15px;
}
</style>